package com.bao.test.test05;

/**
 * @author baoye
 * @date 2024-08-08/19:22
 */
public class LetterPrinter extends Thread{
    private Printer p;

    public LetterPrinter(Printer p) {
        this.p = p;
    }

    public Printer getP() {
        return p;
    }

    public void setP(Printer p) {
        this.p = p;
    }

    public LetterPrinter() {
    }

    @Override
    public void run() {
        for(char c='A';c<='Z';c++){
            p.print(c);
        }
    }
}
